public class Test06 {
    static void main() {
        double h = (double)1000.0F;
        double sum = (double)0.0F;
        for(int i = 1; i <= 5; ++i) {
            sum += h;
            h /= (double)2.0F;
            sum += h;
        }
        System.out.println(h);
        System.out.println(sum);
    }
}
